﻿using System;
using RrslLite.Dsl;
using RrslLite.Net.Contracts;

namespace RrslLite.Net.BatchImpl
{
    public class AsyncBatchBuilder : BatchBuilder
    {
        public new virtual AsyncWcfBatch CurrentBatch
        {
            get { return (AsyncWcfBatch)base.CurrentBatch; }
        }

        protected override IBatchCallBuilder<TTarget> CreateBatchCallBuilder<TTarget>()
        {
            return new AsyncBatchCallBuilder<TTarget>(this);
        }

        protected override Batch CreateBatch()
        {
            return new AsyncWcfBatch(Configuration.RrslLiteConfiguration.Instance.BatchBuilderConfiguration.GetAsyncMessageProcessorProxy());
        }
    }
}